﻿
using System;
using System.ServiceModel;

using WSU.Cheka.HelloWCF.Services;

namespace WSU.Cheka.HelloWCF.Host
{
    static class MultiContractsMultiEndpointsHost
    {
        public static void TestMain()
        {
            using (ServiceHost host = new ServiceHost(typeof(MultiContractsSvc)))
            {
                host.Opened += (sender, evtargs) =>
                    {
                        foreach (Uri baseaddr in host.BaseAddresses)
                        {
                            Console.WriteLine("service opened at baseAddress: {0}", baseaddr.ToString());
                        }
                    };
                host.Open();
                Console.ReadLine();
            }
        }
    }
}